<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" type="text/css" href="/Public/Admin/css/main.css">
        <link rel="stylesheet" type="text/css" href="/Public/static/fullcalendar/css/jquery-ui.css">
        <script type="text/javascript" src="/Public/Admin/js/jquery.min.js"></script>
        <link rel="stylesheet" type="text/css" href="/Public/static/datetimepicker-master/jquery.datetimepicker.css">
        <script type="text/javascript" src="/Public/static/datetimepicker-master/jquery.datetimepicker.js" ></script>
        <style>
            html,body{min-width:auto}
            .fancy p{margin:10px 0}
        </style>
    </head>
    <body>
        <div class="fancy">
            <form>
                <h3>状态：<if condition="$info[status] eq 1"><font color="red">已过时</font><else/><font color="greend">进行中</font></if></h3>
                <p>
                    <span>标题：</span>
                    <input type="text" class="input" name="title" value="{$info.title}">
                </p>
                <p>
                    <span style="vertical-align: top">日程内容：</span>
                    <textarea name="content" class="input" style="width:70%;height:100px">{$info.content}</textarea>
                </p>
                <p>
                    <span>开始时间：</span>
                    <input type="text" class="input" name="start_time" readonly="" value="<if condition='$date neq null'>{$date}<else/>{$info.start_time|date='Y-m-d',###}</if>" autocomplete="off">
                    </span>
                </p>
                <p>
                    <span>结束时间：</span>
                    <input type="text" class="input datepickerInput" name="end_time" value="<if condition='$info[end_time] neq 0'>{$info.end_time|date='Y-m-d',###}</if>" autocomplete="off" data-type="0">
                </p>
                <p>
                    <span>提醒时间：</span>
                    <input type="text" class="input datepickerInput" name="remind_time" value="<if condition='$info[remind_time] neq 0'>{$info.remind_time|date='Y-m-d H:i:s',###}</if>" autocomplete="off" data-type="1">
                </p>
                <p>
                    <span>标记颜色：</span>
                    <input type="radio" class="radio" name="flag_color" value="red" checked="" {$info['flag_color'] == 'red' ? 'checked' : ''}>红色
                    <input type="radio" class="radio" name="flag_color" value="green" {$info['flag_color'] == 'green' ? 'checked' : ''}>绿色
                    <input type="radio" class="radio" name="flag_color" value="blue" {$info['flag_color'] == 'blue' ? 'checked' : ''}>蓝色
                </p>
                <p>
                    <span>指定办理人：</span>
                    <if condition="$info['create_user'] eq null">
                    <input type="radio" class="radio" name="is_send_user" value="1" checked="" {$info['finish'] == '1' ? 'checked' : ''}>指定
                    <input type="radio" class="radio" name="is_send_user" value="0" checked="" {$info['finish'] == '0' ? 'checked' : ''}>不指定
                    <else/>
                    <span class="sendUser">{$info.user_id|getChineseName}<input type='hidden' name='send_user' value="{$info.user_id}"></span>
                    </if>
                </p>
                <p <if condition='$info[create_user] eq null'>style="display: none"</if>>
                    <span>选择人员</span>
                    <select name="send_user" class="input">
                        <foreach name="users" item="user">
                        <option value="{$user.user_id}" {$info['user_id'] == $user['user_id'] ? 'selected' : ''}>{$user.user_name}</option>
                        </foreach>
                    </select>
                </p>
                <p>
                    <span>是否完成：</span>
                    <input type="radio" class="radio" name="finish" value="1" checked="" {$info['finish'] == '1' ? 'checked' : ''}>完成
                    <input type="radio" class="radio" name="finish" value="0" checked="" {$info['finish'] == '0' ? 'checked' : ''}>未完成
                </p>
                <div class="sub_btn">
                    <input type="hidden" name="id" value="{$info.id}">
                    <a class="btn btn_ok btn-submit ajax-post" data-url="{:U('Personal/event')}" data-form="">确定</a>
                    <a class="btn btn_cancel" data-form="">取消</a>
                </div>
            </form>
        </div>
    </body>
</html>
<!--<script type="text/javascript" src="/Public/static/fullcalendar/js/jquery.form.min.js"></script>-->
<script type="text/javascript" src="/Public/static/layer/layer.js" ></script>
<script type="text/javascript" src="/Public/Admin/js/common.js" ></script>
<script type="text/javascript">
    $(dateTime(1));
    $('.btn_cancel').click(function () {
        parent.layer.closeAll();
    })
    $('input[name="is_send_user"]').on('click',function(){
        if($(this).val() == 1){
            $(this).parent().next().show();
        }else{
            $(this).parent().next().hide();
        }
    })
    $('select[name="send_user"]').change(function(){
        var name = $(this).find('option:selected').text();
        $('.sendUser').text(name)
    })
</script>
